<?php
/**
 * Created by PhpStorm.
 * User: bo
 * Date: 2016/9/8
 * Time: 8:43
 */
?>
<?php
require 'head.php';

?>
<form  method="post" action="index.php?c=index&m=commentlist" enctype="multipart/form-data">
    <table class="table  table-bordered">
        <tr>
            <th>序号</th>
            <th>评论编号</th>
            <th>评价内容</th>
            <th>发表时间</th>
            <th>动漫名称</th>
            <th>操作</th>
        </tr>
        <?php
        $i=1;
        foreach($data['comment'] as $row ) {
            if(isset($_SESSION['comment']))

                ?>
                <tr>
                <td width="10%"> <?php echo $i++; ?> </td>
            <td width="20%"> <?php echo $row['yid']; ?> </td>
            <td width="40%"> <?php echo $row['content']; ?> </td>
            <td width="20%">  <?php echo $row['cdate'];?></td>
            <td width="20%"> <?php
                $cid=$row['cid'];
                $user1=mysql_query("select * from cartoons where cid='$cid'");
                $b=mysql_fetch_assoc($user1);
                echo $b['cartoonname']; ?> </td>
            <td width="20%"><a href="index.php?c=index&m=editcomment&yid=<?php echo $row['yid'];?>">修改</a></td>
            </tr>

        <?php  }?>


        </div>
    </table>
</form>